﻿<%@ Page Language="C#" MasterPageFile="~/major/590202/MajorPage.master" AutoEventWireup="true" CodeFile="NewsList.aspx.cs" Inherits="major_590202_NewsList" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Jxzy_Database %>" SelectCommand="SELECT [News_Title], [News_MajorID], [News_ID], [News_Type], Replace([News_TypeName],'应用电子技术->','') [News_TypeName], [News_HasImage], [News_ImageURL], [News_Writer], [News_From], [News_UserID], [News_ModifyDate], [News_Visit] FROM [zyk_News] WHERE [News_Type] like '%{'+@News_Type+'}%' ORDER BY [News_ModifyDate] DESC">
    <SelectParameters>
        <asp:QueryStringParameter DefaultValue="0" Name="News_Type" QueryStringField="newstype"
            Type="String" />
    </SelectParameters>
</asp:SqlDataSource>
<div id="pathbar">
<div class="left">当前位置：应用电子技术::<%Response.Write(getData.getNewsTypeName(Convert.ToInt32(Request.QueryString["newstype"])));%></div> 
                          <div class="right">
                          <form action="#">资源检索：				
						  <input name="keyword" type="text" size="20" onmouseover="this.focus();" onfocus="this.select();" />			
				          <select name="">
				          <option value="1" selected="selected">关键词</option>
				          <option value="2">资源名称</option>
				          </select>
			              <input type="submit" value="检索"/>
			              </form>
			              </div>
</div>
<div id="parameter">
		<div id="counav">
			<h3 class="counav"><span>热门新闻</span></h3>
			<ul>
				<%  
		              
				    Response.Write(getData.getList("590202", 1,1, 0, 10, 10)); 
				    %>
			</ul>
			
        </div>
		<div id="quinav">
			<h3 class="quinav"><span>推荐资源</span></h3>
			<ul>
			    <%Response.Write(getData.getList("590202",1,2,0,10,10,"myclick")); %>
			</ul>
        </div>

	</div>
	
	
	<div id="mainsupport">
	<div class="listbar1">		
	<div class="left1">最 新 文 章</div>	
	</div>
	<div id="content">
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="News_ID" DataSourceID="SqlDataSource1" Width="100%">
            <Columns>
                <asp:BoundField DataField="News_TypeName" HeaderText="类型" SortExpression="News_TypeName" />
                <asp:HyperLinkField DataNavigateUrlFields="News_ID" DataNavigateUrlFormatString="NewsShow.aspx?newsid={0}" 
                    DataTextField="News_Title" HeaderText="标题" >
                    <ItemStyle Width="45%" />
                </asp:HyperLinkField>
                <asp:BoundField DataField="News_Writer" HeaderText="作者" SortExpression="News_Writer" >
                    <ItemStyle Width="15%" />
                </asp:BoundField>
                <asp:BoundField DataField="News_ModifyDate" HeaderText="日期" SortExpression="News_ModifyDate" DataFormatString="{0:d}" HtmlEncode="False" >
                    <ItemStyle Width="15%" />
                </asp:BoundField>
                <asp:BoundField DataField="News_Visit" HeaderText="点击" SortExpression="News_Visit" >
                    <ItemStyle Width="10%" />
                </asp:BoundField>
            </Columns>
            <EmptyDataTemplate>
                没有找到记录！
            </EmptyDataTemplate>
        </asp:GridView>	
	</div></div>
</asp:Content>

